<template>
	<div style="text-align: center;margin-top: 160px;">
		<van-loading style="margin: 0 auto;" v-if="loading"/>
	</div>
</template>

<script lang="ts" setup>
import api from "@/api/api.ts";
import {ref,onMounted } from "vue"
import { useRouter } from 'vue-router'; // 引入useRouter函数
const router = useRouter(); // 获取router实例
let loading=ref(true);
onMounted(()=>{
	api.getUserBase().then(function(data:any){
		if(data.authoritys.indexOf("R_U_U")!= -1){
			router.replace({
				path:"/ses"
			})
		} 
		else if (data.authoritys.indexOf("R_E_U") != -1) {
		    router.replace({
		    	path:"/ses"
		    })
		}
		else if(data.isKf || data.R_S_CUSTOMOR)
		{
			router.replace({
				path:"/navigate/kf"
			})
		}
		else
		{
			router.replace({
				path:"/login"
			})
		}
	})
	
});
	//客服跳转到客服kf/kfVue
	//多学段：如果非hhapp环境，判断是否要弹出多学段绑定关系，如果有有
	
	//多用户绑定：不考虑
	
	//统考用户跳转到统考
	//校内用户跳转到校内
</script>

<style>
</style>